package com.mhc.suzuki.manager.impl;

import com.mhc.suzuki.dal.mapper.ext.OverdueCollectTaskExtMapper;
import com.mhc.suzuki.dal.model.OverdueCollectTaskDO;
import com.mhc.suzuki.dal.query.OverdueCollectTaskQuery;
import com.mhc.suzuki.manager.OverdueCollectTaskManager;
import com.mhc.suzuki.vo.OverdueCollectTaskVO;
import com.subaru.common.query.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;


/**
 * Manager for OverdueCollectTask.
 */

@Component
public class OverdueCollectTaskManagerImpl implements OverdueCollectTaskManager {


    @Autowired
    protected OverdueCollectTaskExtMapper overdueCollectTaskExtMapper;

    /**
     * query count by query condition.
     */
    @Override
    public int countByQuery(OverdueCollectTaskQuery query) {
        return overdueCollectTaskExtMapper.countByQuery(query);
    }

    /**
     * delete by query condition.
     */
    @Override
    public int deleteByQuery(OverdueCollectTaskQuery query) {
        return overdueCollectTaskExtMapper.deleteByQuery(query);
    }

    /**
     * delete by primary key.
     */
    @Override
    public int deleteByPrimaryKey(OverdueCollectTaskDO record) {
        return overdueCollectTaskExtMapper.deleteByPrimaryKey(record);
    }

    /**
     * insert selective.
     */
    @Override
    public long insertSelective(OverdueCollectTaskDO record) {
        return overdueCollectTaskExtMapper.insertSelective(record);
    }

    /**
     * select by query condition.
     */
    @Override
    public List<OverdueCollectTaskDO> selectByQuery(OverdueCollectTaskQuery query) {
        return overdueCollectTaskExtMapper.selectByQuery(query);
    }

    /**
     * select by query condition with page.
     */
    @Override
    public PageResult<OverdueCollectTaskDO> selectByQueryWithPage(OverdueCollectTaskQuery query) {
        PageResult<OverdueCollectTaskDO> result = new PageResult<OverdueCollectTaskDO>();
        result.setPageSize(query.getPageSize());
        result.setPageNo(query.getPageNo());
        result.setTotalCount(this.countByQuery(query));
        result.setResult(this.selectByQuery(query));
        return result;
    }

    /**
     * select by primary key.
     */
    @Override
    public OverdueCollectTaskDO selectByPrimaryKey(Long id) {
        return overdueCollectTaskExtMapper.selectByPrimaryKey(id);
    }

    /**
     * update by query condition selective.
     */
    @Override
    public int updateByQuerySelective(OverdueCollectTaskDO record, OverdueCollectTaskQuery query) {
        return overdueCollectTaskExtMapper.updateByQuerySelective(record, query);
    }

    /**
     * update by query condition.
     */
    @Override
    public int updateByQuery(OverdueCollectTaskDO record, OverdueCollectTaskQuery query) {

        return overdueCollectTaskExtMapper.updateByQuery(record, query);
    }

    /**
     * update by primary key selective.
     */
    @Override
    public int updateByPrimaryKeySelective(OverdueCollectTaskDO record) {
        return overdueCollectTaskExtMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<OverdueCollectTaskVO> getOverdueCollectTaskList(Map queryMap) {
        return overdueCollectTaskExtMapper.getOverdueCollectTaskList(queryMap);
    }
}